package br.com.tcf.entidades;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class DiaSemana implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	private Integer id_dia_semana;

	@Column(unique=true)
	private String nm_dia_semana;

	public Integer getId_dia_semana() {
		return id_dia_semana;
	}
	public void setId_dia_semana(Integer id_dia_semana) {
		this.id_dia_semana = id_dia_semana;
	}
	public String getNm_dia_semana() {
		return nm_dia_semana;
	}
	public void setNm_dia_semana(String nm_dia_semana) {
		this.nm_dia_semana = nm_dia_semana;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((id_dia_semana == null) ? 0 : id_dia_semana.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof DiaSemana)) {
			return false;
		}
		DiaSemana other = (DiaSemana) obj;
		if (id_dia_semana == null) {
			if (other.id_dia_semana != null) {
				return false;
			}
		} else if (!id_dia_semana.equals(other.id_dia_semana)) {
			return false;
		}
		return true;
	}
	@Override
	public String toString() {
		return this.nm_dia_semana;
	}
}
